<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>心形</title>
	<style type="text/css">
		canvas{
			margin-top: 100px;
			border:1px solid red;
		}
	</style>
</head>
<body>
<canvas width="500" height="500" id="can">您的浏览器版本太低，不支持画布，请升级您的浏览器</canvas>
<script type="text/javascript">
	// 获取画布
	var can=document.getElementById("can");
	// 获取画笔
	var pen=can.getContext("2d");
	pen.moveTo(323,109);
	pen.bezierCurveTo(147,10,210,240,330,282);
	pen.moveTo(323,109);
	pen.bezierCurveTo(459,20,488,190,330,282);
	pen.fillStyle="red";
	pen.fill();
	pen.strokeStyle="red";


	pen.stroke();






</script>





</body>
</html>